from manim import *


class MovingDots(Scene):
    def construct(self):
        d1 = Dot(color=BLUE)
        x = ValueTracker(0)
        y = ValueTracker(0)

        d1.add_updater(lambda z: z.set_x(x.get_value()))
        d1.add_updater(lambda z: z.set_y(y.get_value()))

        self.add(d1)
        self.play(x.animate.set_value(3), run_time=2)
        self.wait()
        self.play(x.animate.set_value(5), run_time=2)
        self.wait()
        self.play(y.animate.set_value(3), run_time=2)
        self.wait()
        self.play(y.animate.set_value(-3), run_time=2)
        self.wait()
